package com.mgface.framework.service;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

import com.mgface.framework.condition.WindowsPlatformCondition;

@Configuration
public class JudgeConditionConfiguration {
	/**
	 * <ul>
	 * <li>@Conditional注解主要用在以下位置：</li>
	 * <li>1)类级别可以放在注标识有@Component（包含@Configuration）的类上</li>
	 * <li>2)作为一个meta-annotation,组成自定义注解</li>
	 * <li>3)方法级别可以放在标识有@Bean的方法上</li>
	 * </ul>
	 * 
	 * @author wanyuxiang
	 *
	 */
	@Bean
	@Conditional(WindowsPlatformCondition.class)
	public JudgeConditionService getInstance() {
		return new JudgeConditionService();
	}
}
